﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="TCDC_System.test" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <ext:ResourceManager ID="mainResource" runat="server" CleanResourceUrl="false" />
    <form id="form1" runat="server">
    <ext:Viewport ID="Viewport1" runat="server" Layout="border">
        <Items>
         
            <ext:GridPanel ID="GridPanelLastRegister" runat="server" Region="Center" DDGroup="gridDDGroup"
                EnableDragDrop="false" StripeRows="true" Title="กรอกข้อมูลสมัครสมาชิกล่าสุด"
                Icon="KeyboardAdd">
                <TopBar>
                    <ext:Toolbar ID="Toolbar2" runat="server">
                        <Items>
                            <ext:Button ID="Button1" runat="server" Text="Add" Icon="Add" OnDirectClick="btAddClick" />
                            <ext:ToolbarSeparator />
                            <ext:Button ID="Button2" runat="server" Text="Delete" Icon="Delete" OnDirectClick="btDeleteClick">
                            </ext:Button>
                            <ext:ToolbarSeparator />
                            <ext:ToolbarFill ID="ToolbarFill2" runat="server" />
                            <ext:Button ID="Button3" runat="server" AutoPostBack="true" Text="To Excel" Icon="PageExcel" />
                        </Items>
                    </ext:Toolbar>
                </TopBar>
                <Store>
                    <ext:Store runat="server" ID="StoreUser">
                        <Reader>
                            <ext:JsonReader IDProperty="user_campaign_id">
                                <Fields>
                                    <ext:RecordField Name="user_campaign_id" />
           
                                    <ext:RecordField Name="id_card" />
                                    <ext:RecordField Name="fname_th" />
                                    <ext:RecordField Name="lname_th" />
                                    <ext:RecordField Name="fname_en" />
                                    <ext:RecordField Name="lname_en" />
                                    <ext:RecordField Name="create_date" />
                                </Fields>
                            </ext:JsonReader>
                        </Reader>
                    </ext:Store>
                </Store>
                <ColumnModel>
                    <Columns>
                        <ext:RowNumbererColumn />
                        <ext:Column Header="User Campaign ID" DataIndex="user_campaign_id" Hidden="true" />
                        <ext:Column Header="บัตรประชาชน/หนังสือเดินทาง" DataIndex="id_card" Width="150" />
                        <ext:Column Header="ชื่อ (ไทย)" DataIndex="fname_th" Width="150" />
                        <ext:Column Header="นามสกุล (ไทย)" DataIndex="lname_th" Width="150" />
                        <ext:Column Header="ชื่อ (อังกฤษ)" DataIndex="fname_en" Width="150" />
                        <ext:Column Header="นามสกุล (อังกฤษ)" DataIndex="lname_en" Width="150" />
                        <ext:Column Header="create_date" DataIndex="create_date" Width="150" />
                    </Columns>
                </ColumnModel>
   <%--             <SelectionModel>
                    <ext:RowSelectionModel ID="RowSelectionModel2" runat="server" SingleSelect="true">
                        <DirectEvents>
                            <RowSelect OnEvent="rowSelectLastRegister" Buffer="100">
                                <ExtraParams>
                                    <ext:Parameter Name="select_user_campaign_id" Value="this.getSelected().data.user_campaign_id"
                                        Mode="Raw" />
                                </ExtraParams>
                            </RowSelect>
                        </DirectEvents>
                    </ext:RowSelectionModel>
                </SelectionModel>--%>
                <LoadMask ShowMask="true" />
                <BottomBar>
                    <ext:PagingToolbar ID="PagingToolbar2" runat="server" PageSize="4" DisplayInfo="true"
                        EmptyMsg="No Request to display" />
                </BottomBar>
            </ext:GridPanel>
            <ext:FormPanel ID="FormPanelDataBasic" runat="server" Region="East" Collapsible="true"
                Collapsed="false" Split="true" Width="600" MinWidth="225" Layout="Fit" Title="Data Basic"
                BodyStyle="background-color: #DFE8F6" Padding="5" LabelWidth="50" Icon="Folder">
                <Items>
                    <ext:Label runat="server" ID="lbComment" />
                    <ext:TextField ID="txttest" runat="server" FieldLabel="Test" Width="250" />
                </Items>
            </ext:FormPanel>
        </Items>
    </ext:Viewport>
    </form>
</body>
</html>
